package com.sg.service.biz.bff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.bff.req.BffApproveSucceedReportTaskReqDto;
import com.sg.dto.biz.bff.req.BffCommitReportTaskReqDto;
import com.sg.dto.biz.bff.req.BffImplementCalcEvaTempAllContentDatasReqDto;
import com.sg.dto.biz.bff.req.BffImplementRecalcAllStandardDataReqDto;
import com.sg.dto.biz.bff.res.BffApproveSucceedReportTaskRespDto;
import com.sg.dto.biz.bff.res.BffCommitReportTaskRespDto;
import com.sg.dto.biz.bff.res.BffImplementCalcEvaTempAllContentDatasRespDto;
import com.sg.dto.biz.bff.res.BffImplementRecalcAllStandardDataRespDto;
import com.sg.service.biz.bff.GridCalculateService;
import com.wicket.okrapp.integration.*;
import com.wicket.okrapp.integration.dto.*;
import com.sg.common.exception.Assert;
import com.wicket.okrcalc.integration.GridCalculateService;
import com.wicket.okrcomponent.integration.ConfSchemeService;
import com.wicket.okrcomponent.integration.MessageService;
import com.wicket.okrframework.integration.DivineDataService;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class GridCalculateServiceImpl implements GridCalculateService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    com.sg.service.biz.app.TaskService fwAppTaskClient;

    @Resource
    com.sg.service.biz.component.ConfSchemeService fwCompConfSchemeClient;

    @Resource
    com.sg.service.biz.app.GridCalculateService fwAppGridCalculateClient;

    @Resource
    com.sg.service.biz.calc.GridCalculateService fwCalcGridCalculateClient;
    @Resource
    com.sg.service.biz.framework.DivineDataService fwBaseDivineDataClient;

    @Resource
    com.sg.service.biz.app.TargetCycleService fwAppTargetCycleClient;

    @Resource
    com.sg.service.biz.framework.EvaThemeService fwAppEvaThemeClient;

    @Resource
    com.sg.service.biz.app.ConventionalSchedulingService fwAppConventionalSchedulingClient;
    @Resource
    com.sg.service.biz.app.ProgressPublicTechnicaCapacityService fwAppProgressPublicTechnicaCapacityClient;
    @Resource
    com.sg.service.biz.app.VirtualOrgService fwAppVirtualOrgClient;
    @Resource
    com.sg.service.biz.app.IndexSystemService fwAppIndexSystemClient;
    @Resource
    com.sg.service.biz.app.ExecuteProgressService fwAppExecuteProgressClient;
    @Resource
    com.sg.service.biz.app.MessageService fwAppMessageClient;
    @Resource
    com.sg.service.biz.app.TargetContentService fwAppTargetContentClient;
    @Resource
    com.sg.service.biz.framework.MessageService fwCompMessageClient;
    @Resource
    com.sg.service.biz.app.CycleStageDataService fwAppCycleStageDataClient;
    @Resource
    com.sg.service.biz.app.FinanceService fwAppFinanceClient;
    @Resource
    com.sg.service.biz.framework.TargetCalcService fwAppTargetCalcClient;

    /**
     * B3-提交汇报任务[6377]
     * gen by moon at 10/27/2024, 12:48:44 AM
     */
    @Trace(operationName = "B3-提交汇报任务")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffCommitReportTaskRespDto commitReportTask(BffCommitReportTaskReqDto reqDto) {


//virtualUsage D3-操作汇报任务权限校验(公共)  48562
        TempStorageTaskReportPermissionVerificationComRespDto tempStorageTaskReportPermissionVerificationComRespDto = null;
        TempStorageTaskReportPermissionVerificationComReqDto tempStorageTaskReportPermissionVerificationComReqDto = new TempStorageTaskReportPermissionVerificationComReqDto();
        if (reqDto != null) {
            tempStorageTaskReportPermissionVerificationComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1122708_1_48562
        }

        /*D3-操作汇报任务权限校验(公共)[6302]   */
        Assert.isNull(tempStorageTaskReportPermissionVerificationComReqDto.getEvaluationTemplateId(), "B3-提交汇报任务-D3-操作汇报任务权限校验(公共)-冗余评价模板ID不能为空", false);
        tempStorageTaskReportPermissionVerificationComRespDto = fwAppTaskClient.tempStorageTaskReportPermissionVerificationCom(tempStorageTaskReportPermissionVerificationComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//virtualUsage D3-判断当前汇报人是否负责人(公共)  69900
        JudgeCurReporterIsPersonLiableComRespDto judgeCurReporterIsPersonLiableComRespDto = null;
        JudgeCurReporterIsPersonLiableComReqDto judgeCurReporterIsPersonLiableComReqDto = new JudgeCurReporterIsPersonLiableComReqDto();
        judgeCurReporterIsPersonLiableComReqDto.setUseScene("TARGET_PLAN_SCENE");//sourceId:1863337_1_69900
        if (reqDto != null) {
            judgeCurReporterIsPersonLiableComReqDto.setEntityId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1863335_1_69900
            judgeCurReporterIsPersonLiableComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1863336_1_69900
        }

        /*D3-判断当前汇报人是否负责人(公共)[8537]   */
        Assert.isNull(judgeCurReporterIsPersonLiableComReqDto.getEntityId(), "B3-提交汇报任务-D3-判断当前汇报人是否负责人(公共)-冗余内容表主键ID不能为空", false);
        Assert.isNull(judgeCurReporterIsPersonLiableComReqDto.getEvaluationTemplateId(), "B3-提交汇报任务-D3-判断当前汇报人是否负责人(公共)-归属对象ID不能为空", false);
        Assert.isNull(judgeCurReporterIsPersonLiableComReqDto.getUseScene(), "B3-提交汇报任务-D3-判断当前汇报人是否负责人(公共)-虚拟组织使用场景不能为空", false);
        judgeCurReporterIsPersonLiableComRespDto = fwAppVirtualOrgClient.judgeCurReporterIsPersonLiableCom(judgeCurReporterIsPersonLiableComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//virtualUsage D3-7提交汇报任务(公共)  38270
        CommitReportingTaskComRespDto commitReportingTaskComRespDto = null;
        CommitReportingTaskComReqDto commitReportingTaskComReqDto = new CommitReportingTaskComReqDto();
        commitReportingTaskComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:867496_1_38270
        if (reqDto != null) {
            commitReportingTaskComReqDto.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:867492_1_38270
            commitReportingTaskComReqDto.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:867497_1_38270
            commitReportingTaskComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:867491_1_38270
            commitReportingTaskComReqDto.setStaWorSumCon(reqDto.getStaWorSumCon());//SimpleFieldAssign//sourceId:867488_1_38270
            commitReportingTaskComReqDto.setTextSummaryData(reqDto.getTextSummaryData());//SimpleFieldAssign//sourceId:1072576_1_38270
            commitReportingTaskComReqDto.setSumOfPro(reqDto.getSumOfPro());//SimpleFieldAssign//sourceId:867489_1_38270
            commitReportingTaskComReqDto.setSolvingIdeas(reqDto.getSolvingIdeas());//SimpleFieldAssign//sourceId:867490_1_38270
            commitReportingTaskComReqDto.setIsActualReceptionCycle(reqDto.getIsActualReceptionCycle());//SimpleFieldAssign//sourceId:867494_1_38270
            commitReportingTaskComReqDto.setTargetId(reqDto.getTargetId());//SimpleFieldAssign//sourceId:867498_1_38270
            commitReportingTaskComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:867493_1_38270
        }
        if (reqDto != null && reqDto.getDocumentList() != null && !CollectionUtil.isEmpty(reqDto.getDocumentList())) {
            commitReportingTaskComReqDto.setDocumentList(reqDto.getDocumentList().stream().map(item -> BeanUtil.toBean(item, DocumentDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:867495_1_38270
        }
        if (reqDto != null && reqDto.getCycleStageDataAttDocList() != null && !CollectionUtil.isEmpty(reqDto.getCycleStageDataAttDocList())) {
            commitReportingTaskComReqDto.setCycleStageDataAttDocList(reqDto.getCycleStageDataAttDocList().stream().map(item -> BeanUtil.toBean(item, CycleStageDataAttDocDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:867499_1_38270
        }

        /*D3-7提交汇报任务(公共)[2703]   */
        Assert.isNull(commitReportingTaskComReqDto.getCycleStageDataId(), "B3-提交汇报任务-D3-7提交汇报任务(公共)-周期阶段资料记录ID不能为空", false);
        Assert.isNull(commitReportingTaskComReqDto.getTaskId(), "B3-提交汇报任务-D3-7提交汇报任务(公共)-任务ID不能为空", false);
        Assert.isNull(commitReportingTaskComReqDto.getEvaObjTargetCycleId(), "B3-提交汇报任务-D3-7提交汇报任务(公共)-被评对象目标周期ID不能为空", false);
        Assert.isNull(commitReportingTaskComReqDto.getSubjectLifeCycle(), "B3-提交汇报任务-D3-7提交汇报任务(公共)-主体生命周期不能为空", false);
        Assert.isNull(commitReportingTaskComReqDto.getTargetId(), "B3-提交汇报任务-D3-7提交汇报任务(公共)-冗余目标ID不能为空", false);
        Assert.isNull(commitReportingTaskComReqDto.getEvaluationTemplateId(), "B3-提交汇报任务-D3-7提交汇报任务(公共)-冗余评价模板ID不能为空", false);
        commitReportingTaskComRespDto = fwAppTaskClient.commitReportingTaskCom(commitReportingTaskComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//virtualUsage D3-执行状态消息数量入参准备(公共)  50451
        ImplementDataForLocationMessageHandleComRespDto implementDataForLocationMessageHandleComRespDto = null;
        ImplementDataForLocationMessageHandleComReqDto implementDataForLocationMessageHandleComReqDto = new ImplementDataForLocationMessageHandleComReqDto();
        if (reqDto != null) {
            implementDataForLocationMessageHandleComReqDto.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:1465633_1_50451
            implementDataForLocationMessageHandleComReqDto.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1465634_1_50451
            implementDataForLocationMessageHandleComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1465635_1_50451
            implementDataForLocationMessageHandleComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1465636_1_50451
            implementDataForLocationMessageHandleComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1465637_1_50451
        }

        /*D3-执行状态消息数量入参准备(公共)[7574]   */
        Assert.isNull(implementDataForLocationMessageHandleComReqDto.getCycleStageDataId(), "B3-提交汇报任务-D3-执行状态消息数量入参准备(公共)-周期阶段资料记录ID不能为空", false);
        Assert.isNull(implementDataForLocationMessageHandleComReqDto.getTaskId(), "B3-提交汇报任务-D3-执行状态消息数量入参准备(公共)-任务ID不能为空", false);
        Assert.isNull(implementDataForLocationMessageHandleComReqDto.getTargetCycleContentId(), "B3-提交汇报任务-D3-执行状态消息数量入参准备(公共)-关联目标内容ID不能为空", false);
        Assert.isNull(implementDataForLocationMessageHandleComReqDto.getTargetCycleContentTypeCode(), "B3-提交汇报任务-D3-执行状态消息数量入参准备(公共)-关联目标内容类型编码不能为空", false);
        Assert.isNull(implementDataForLocationMessageHandleComReqDto.getEvaluationTemplateId(), "B3-提交汇报任务-D3-执行状态消息数量入参准备(公共)-冗余评价模板ID不能为空", false);
        implementDataForLocationMessageHandleComRespDto = fwAppMessageClient.implementDataForLocationMessageHandleCom(implementDataForLocationMessageHandleComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//virtualUsage D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)  58592
        ImplementCycleStageDataMessageComRespDto implementCycleStageDataMessageComRespDto = null;
        if (implementDataForLocationMessageHandleComRespDto != null) {
            ImplementCycleStageDataMessageComReqDto implementCycleStageDataMessageComReqDto = new ImplementCycleStageDataMessageComReqDto();
            if (reqDto != null) {
                implementCycleStageDataMessageComReqDto.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:1467527_1_58592
                implementCycleStageDataMessageComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1467524_1_58592
                implementCycleStageDataMessageComReqDto.setCycleDataObjId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1467525_1_58592
                implementCycleStageDataMessageComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1467528_1_58592
                implementCycleStageDataMessageComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1467529_1_58592
                implementCycleStageDataMessageComReqDto.setTargetId(reqDto.getTargetId());//SimpleFieldAssign//sourceId:1467530_1_58592
                implementCycleStageDataMessageComReqDto.setThemeContentId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1467526_1_58592
            }
            if (implementDataForLocationMessageHandleComRespDto != null) {
                implementCycleStageDataMessageComReqDto.setTaskName(implementDataForLocationMessageHandleComRespDto.getTaskName());//SimpleFieldAssign//sourceId:1468485_1_58592
                implementCycleStageDataMessageComReqDto.setRoleCode(implementDataForLocationMessageHandleComRespDto.getRoleCode());//SimpleFieldAssign//sourceId:1478732_1_58592
            }

            /*D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)[7317]   */
            Assert.isNull(implementCycleStageDataMessageComReqDto.getCycleStageDataId(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-周期阶段资料记录ID不能为空", false);
            Assert.isNull(implementCycleStageDataMessageComReqDto.getCycleId(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-周期ID不能为空", false);
            Assert.isNull(implementCycleStageDataMessageComReqDto.getCycleDataObjId(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-周期资料归属对象ID不能为空", false);
            Assert.isNull(implementCycleStageDataMessageComReqDto.getTargetCycleContentId(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-关联目标内容ID不能为空", false);
            Assert.isNull(implementCycleStageDataMessageComReqDto.getTargetCycleContentTypeCode(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-关联目标内容类型编码不能为空", false);
            Assert.isNull(implementCycleStageDataMessageComReqDto.getTargetId(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-冗余目标ID不能为空", false);
            Assert.isNull(implementCycleStageDataMessageComReqDto.getThemeContentId(), "B3-提交汇报任务-D3-执行问题总结及解决思路周期阶段资料发送消息处理(公共)-主题内容ID不能为空", false);
            implementCycleStageDataMessageComRespDto = fwAppCycleStageDataClient.implementCycleStageDataMessageCom(implementCycleStageDataMessageComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }
        if ((implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsSubjectiveScoring() != null && implementDataForLocationMessageHandleComRespDto.getIsSubjectiveScoring().equals("FALSE") && implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsAutoReport() != null && implementDataForLocationMessageHandleComRespDto.getIsAutoReport().equals("FALSE"))) {
            //if((D3-发送消息及状态位置数量更新的数据准备.是否开启主观评分 等于 否 and D3-发送消息及状态位置数量更新的数据准备.是否自动汇报 等于 否))  50431

            if ((implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsOpenAudit() != null && implementDataForLocationMessageHandleComRespDto.getIsOpenAudit().equals("TRUE"))) {
                //if(D3-发送消息及状态位置数量更新的数据准备.是否开启主管人工审核 等于 是)  50433

                ImplementJudgePersonLiableIsDirectorComRespDto implementJudgePersonLiableIsDirectorComRespDto = null;
                ImplementJudgePersonLiableIsDirectorComReqDto implementJudgePersonLiableIsDirectorComReqDto = new ImplementJudgePersonLiableIsDirectorComReqDto();
                if (reqDto != null) {
                    implementJudgePersonLiableIsDirectorComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1110986_1_50436
                    implementJudgePersonLiableIsDirectorComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1075182_1_50436
                }

                /*D3-判断汇报任务是否需要审核（负责人/评价人和主管是否同一人）[7283]   */
                Assert.isNull(implementJudgePersonLiableIsDirectorComReqDto.getTargetCycleContentId(), "B3-提交汇报任务-D3-判断汇报任务是否需要审核（负责人/评价人和主管是否同一人）-关联目标内容ID不能为空", false);
                Assert.isNull(implementJudgePersonLiableIsDirectorComReqDto.getEvaluationTemplateId(), "B3-提交汇报任务-D3-判断汇报任务是否需要审核（负责人/评价人和主管是否同一人）-冗余评价模板ID不能为空", false);
                implementJudgePersonLiableIsDirectorComRespDto = fwAppVirtualOrgClient.implementJudgePersonLiableIsDirectorCom(implementJudgePersonLiableIsDirectorComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                if ((implementJudgePersonLiableIsDirectorComRespDto != null && implementJudgePersonLiableIsDirectorComRespDto.getTureOrFalse() != null && implementJudgePersonLiableIsDirectorComRespDto.getTureOrFalse().equals("FALSE"))) {
                    //if(D3-判断汇报任务是否需要审核（负责人和主管同一人则无需审核）.汇报任务是否需要审核 等于 否)  50437

                    ImplementExaReportTaskAndCalcCurAndAnceStdDataComRespDto implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto = null;
                    if (implementDataForLocationMessageHandleComRespDto != null) {
                        ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto = new ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto();
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setDataCalcNormalAbnormal("NORMAL_SCENE");//sourceId:2024394_1_69887
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setStatusBizOptType("SUB_REPORT_TASK_SUB_TO_SUC");//sourceId:1865023_1_69887
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setCalcAndRefreshDataType("APPROVE_CALC");//sourceId:1862415_1_69887
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setApproveCalcScene("PLAN_TARGET_AND_FINACE_CALC");//sourceId:1862416_1_69887
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setExamineOptType("APPROVE");//sourceId:1862407_1_69887
                        if (reqDto != null) {
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:1862409_1_69887
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1862408_1_69887
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1862411_1_69887
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1862410_1_69887
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1862412_1_69887
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1862413_1_69887
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1862414_1_69887
                        }
                        if (implementDataForLocationMessageHandleComRespDto != null) {
                            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setRoleCode(implementDataForLocationMessageHandleComRespDto.getRoleCode());//SimpleFieldAssign//sourceId:1865322_1_69887
                        }

                        /*D3执行审核汇报任务并计算当前及祖先标准数据(公共)[9734]   */
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getDataCalcNormalAbnormal(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-数据计算正常与异常场景不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getStatusBizOptType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-任务转成功状态业务操作类型不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getCalcAndRefreshDataType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-计算与刷新财务数据类型不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getApproveCalcScene(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核的计算场景不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getExamineOptType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核通过或失败操作类型不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getCycleId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-归属周期ID不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getEvaObjTargetCycleId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-被评对象目标周期ID不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getTargetCycleContentId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容ID不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getTargetCycleContentTypeCode(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容类型编码不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getEvaluationTemplateId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-冗余评价模板ID不能为空", false);
                        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getRoleCode(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-当前操作人小圈子角色标识不能为空", false);
                        implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto = fwAppTargetCalcClient.implementExaReportTaskAndCalcCurAndAnceStdDataCom(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                    }
                } else if ((implementJudgePersonLiableIsDirectorComRespDto != null && implementJudgePersonLiableIsDirectorComRespDto.getTureOrFalse() != null && implementJudgePersonLiableIsDirectorComRespDto.getTureOrFalse().equals("TRUE"))) {
                    //elseif(D3-判断汇报任务是否需要审核（负责人和主管同一人则无需审核）.汇报任务是否需要审核 等于 是)  50453

                    RefreshReportTaskStatusMsgAndMsgNumComRespDto refreshReportTaskStatusMsgAndMsgNumComRespDto = null;
                    if (implementDataForLocationMessageHandleComRespDto != null) {
                        RefreshReportTaskStatusMsgAndMsgNumComReqDto refreshReportTaskStatusMsgAndMsgNumComReqDto = new RefreshReportTaskStatusMsgAndMsgNumComReqDto();
                        refreshReportTaskStatusMsgAndMsgNumComReqDto.setStatusBizOptType("SUB_REPORT_TASK_SUB_TO_EXA");//sourceId:1465569_1_58447
                        refreshReportTaskStatusMsgAndMsgNumComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1465572_1_58447
                        refreshReportTaskStatusMsgAndMsgNumComReqDto.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:1465573_1_58447
                        if (reqDto != null) {
                            refreshReportTaskStatusMsgAndMsgNumComReqDto.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1465570_1_58447
                        }
                        if (implementDataForLocationMessageHandleComRespDto != null) {
                            refreshReportTaskStatusMsgAndMsgNumComReqDto.setRoleCode(implementDataForLocationMessageHandleComRespDto.getRoleCode());//SimpleFieldAssign//sourceId:1478545_1_58447
                        }

                        /*D3-更新汇报任务状态及消息与数量（待汇报转待审核）[8263]   */
                        Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto.getStatusBizOptType(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待审核）-状态业务操作类型不能为空", false);
                        Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto.getTaskId(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待审核）-任务ID不能为空", false);
                        Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto.getRoleCode(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待审核）-角色标识不能为空", false);
                        Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto.getSpaceId(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待审核）-创建于空间ID不能为空", false);
                        Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto.getAppId(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待审核）-创建于联盟应用ID不能为空", false);
                        refreshReportTaskStatusMsgAndMsgNumComRespDto = fwAppTaskClient.refreshReportTaskStatusMsgAndMsgNumCom(refreshReportTaskStatusMsgAndMsgNumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                    }
                }
            } else if ((implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsOpenAudit() != null && implementDataForLocationMessageHandleComRespDto.getIsOpenAudit().equals("FALSE"))) {
                //elseif(D3-发送消息及状态位置数量更新的数据准备.是否开启主管人工审核 等于 否)  50434

                ImplementExaReportTaskAndCalcCurAndAnceStdDataComRespDto implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto_1 = null;
                if (implementDataForLocationMessageHandleComRespDto != null) {
                    ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1 = new ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto();
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setDataCalcNormalAbnormal("NORMAL_SCENE");//sourceId:2024394_1_69888
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setStatusBizOptType("SUB_REPORT_TASK_SUB_TO_SUC");//sourceId:1865023_1_69888
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setCalcAndRefreshDataType("APPROVE_CALC");//sourceId:1862415_1_69888
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setApproveCalcScene("PLAN_TARGET_AND_FINACE_CALC");//sourceId:1862416_1_69888
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setExamineOptType("APPROVE");//sourceId:1862407_1_69888
                    if (reqDto != null) {
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:1862409_1_69888
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1862408_1_69888
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1862411_1_69888
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1862410_1_69888
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1862412_1_69888
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1862413_1_69888
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1862414_1_69888
                    }
                    if (implementDataForLocationMessageHandleComRespDto != null) {
                        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.setRoleCode(implementDataForLocationMessageHandleComRespDto.getRoleCode());//SimpleFieldAssign//sourceId:1865322_1_69888
                    }

                    /*D3执行审核汇报任务并计算当前及祖先标准数据(公共)[9734]   */
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getDataCalcNormalAbnormal(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-数据计算正常与异常场景不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getStatusBizOptType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-任务转成功状态业务操作类型不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getCalcAndRefreshDataType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-计算与刷新财务数据类型不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getApproveCalcScene(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核的计算场景不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getExamineOptType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核通过或失败操作类型不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getCycleId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-归属周期ID不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getEvaObjTargetCycleId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-被评对象目标周期ID不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getTargetCycleContentId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容ID不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getTargetCycleContentTypeCode(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容类型编码不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getEvaluationTemplateId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-冗余评价模板ID不能为空", false);
                    Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1.getRoleCode(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-当前操作人小圈子角色标识不能为空", false);
                    implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto_1 = fwAppTargetCalcClient.implementExaReportTaskAndCalcCurAndAnceStdDataCom(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                }
            }
        } else if ((implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsSubjectiveScoring() != null && implementDataForLocationMessageHandleComRespDto.getIsSubjectiveScoring().equals("TRUE") && implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsAutoReport() != null && implementDataForLocationMessageHandleComRespDto.getIsAutoReport().equals("FALSE"))) {
            //elseif((D3-发送消息及状态位置数量更新的数据准备.是否开启主观评分 等于 是 and D3-发送消息及状态位置数量更新的数据准备.是否自动汇报 等于 否))  50442

            RefreshReportTaskStatusMsgAndMsgNumComRespDto refreshReportTaskStatusMsgAndMsgNumComRespDto_1 = null;
            if (implementDataForLocationMessageHandleComRespDto != null) {
                RefreshReportTaskStatusMsgAndMsgNumComReqDto refreshReportTaskStatusMsgAndMsgNumComReqDto_1 = new RefreshReportTaskStatusMsgAndMsgNumComReqDto();
                refreshReportTaskStatusMsgAndMsgNumComReqDto_1.setStatusBizOptType("SUB_REPORT_TASK_SUB_TO_EVA");//sourceId:1465545_1_58449
                refreshReportTaskStatusMsgAndMsgNumComReqDto_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1465548_1_58449
                refreshReportTaskStatusMsgAndMsgNumComReqDto_1.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:1465549_1_58449
                if (reqDto != null) {
                    refreshReportTaskStatusMsgAndMsgNumComReqDto_1.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1465546_1_58449
                }
                if (implementDataForLocationMessageHandleComRespDto != null) {
                    refreshReportTaskStatusMsgAndMsgNumComReqDto_1.setRoleCode(implementDataForLocationMessageHandleComRespDto.getRoleCode());//SimpleFieldAssign//sourceId:1477957_1_58449
                }

                /*D3-更新汇报任务状态及消息与数量（待汇报转待评价）[8263]   */
                Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto_1.getStatusBizOptType(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待评价）-状态业务操作类型不能为空", false);
                Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto_1.getTaskId(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待评价）-任务ID不能为空", false);
                Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto_1.getRoleCode(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待评价）-角色标识不能为空", false);
                Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto_1.getSpaceId(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待评价）-创建于空间ID不能为空", false);
                Assert.isNull(refreshReportTaskStatusMsgAndMsgNumComReqDto_1.getAppId(), "B3-提交汇报任务-D3-更新汇报任务状态及消息与数量（待汇报转待评价）-创建于联盟应用ID不能为空", false);
                refreshReportTaskStatusMsgAndMsgNumComRespDto_1 = fwAppTaskClient.refreshReportTaskStatusMsgAndMsgNumCom(refreshReportTaskStatusMsgAndMsgNumComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            }
        } else if ((implementDataForLocationMessageHandleComRespDto != null && implementDataForLocationMessageHandleComRespDto.getIsAutoReport() != null && implementDataForLocationMessageHandleComRespDto.getIsAutoReport().equals("TRUE"))) {
            //elseif(D3-发送消息及状态位置数量更新的数据准备.是否自动汇报 等于 是)  72770

            ImplementExaReportTaskAndCalcCurAndAnceStdDataComRespDto implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto_2 = null;
            if (implementDataForLocationMessageHandleComRespDto != null) {
                ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2 = new ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto();
                implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setDataCalcNormalAbnormal("NORMAL_SCENE");//sourceId:2024394_1_72771
                implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setStatusBizOptType("SUB_REPORT_TASK_SUB_TO_SUC");//sourceId:1865023_1_72771
                implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setCalcAndRefreshDataType("APPROVE_CALC");//sourceId:1862415_1_72771
                implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setApproveCalcScene("PLAN_TARGET_AND_FINACE_CALC");//sourceId:1862416_1_72771
                implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setExamineOptType("APPROVE");//sourceId:1862407_1_72771
                if (reqDto != null) {
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:1862409_1_72771
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1862408_1_72771
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1862411_1_72771
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1862410_1_72771
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1862412_1_72771
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1862413_1_72771
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1862414_1_72771
                }
                if (implementDataForLocationMessageHandleComRespDto != null) {
                    implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.setRoleCode(implementDataForLocationMessageHandleComRespDto.getRoleCode());//SimpleFieldAssign//sourceId:1865322_1_72771
                }

                /*D3执行审核汇报任务并计算当前及祖先标准数据(公共)[9734]   */
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getDataCalcNormalAbnormal(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-数据计算正常与异常场景不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getStatusBizOptType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-任务转成功状态业务操作类型不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getCalcAndRefreshDataType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-计算与刷新财务数据类型不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getApproveCalcScene(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核的计算场景不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getExamineOptType(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核通过或失败操作类型不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getCycleId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-归属周期ID不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getEvaObjTargetCycleId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-被评对象目标周期ID不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getTargetCycleContentId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容ID不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getTargetCycleContentTypeCode(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容类型编码不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getEvaluationTemplateId(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-冗余评价模板ID不能为空", false);
                Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2.getRoleCode(), "B3-提交汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-当前操作人小圈子角色标识不能为空", false);
                implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto_2 = fwAppTargetCalcClient.implementExaReportTaskAndCalcCurAndAnceStdDataCom(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto_2).getData()/*vcase invoke 跨dubbo调用;*/;


            }
        }
        BffCommitReportTaskRespDto retData = new BffCommitReportTaskRespDto();


        return retData;
    }

    /**
     * B3-审核汇报任务[6375]
     * gen by moon at 10/27/2024, 12:48:42 AM
     */
    @Trace(operationName = "B3-审核汇报任务")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffApproveSucceedReportTaskRespDto approveSucceedReportTask(BffApproveSucceedReportTaskReqDto reqDto) {


        //步骤0: D3-审核汇报任务权限校验(公共) - approveSucceedTaskReportPermissionVerificationCom
        ApproveSucceedTaskReportPermissionVerificationComRespDto approveSucceedTaskReportPermissionVerificationComRespDto = null;
        ApproveSucceedTaskReportPermissionVerificationComReqDto approveSucceedTaskReportPermissionVerificationComReqDto = new ApproveSucceedTaskReportPermissionVerificationComReqDto();
        if (reqDto != null) {
            approveSucceedTaskReportPermissionVerificationComReqDto.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:868110_1
            approveSucceedTaskReportPermissionVerificationComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:868111_1
            approveSucceedTaskReportPermissionVerificationComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:868109_1
        }

        /*D3-审核汇报任务权限校验【异常报错】[6303]   */
        Assert.isNull(approveSucceedTaskReportPermissionVerificationComReqDto.getCycleStageDataId(), "B3-审核汇报任务-D3-审核汇报任务权限校验【异常报错】-周期阶段资料记录ID不能为空", false);
        Assert.isNull(approveSucceedTaskReportPermissionVerificationComReqDto.getEvaObjTargetCycleId(), "B3-审核汇报任务-D3-审核汇报任务权限校验【异常报错】-被评对象目标周期ID不能为空", false);
        Assert.isNull(approveSucceedTaskReportPermissionVerificationComReqDto.getEvaluationTemplateId(), "B3-审核汇报任务-D3-审核汇报任务权限校验【异常报错】-冗余评价模板ID不能为空", false);
        approveSucceedTaskReportPermissionVerificationComRespDto = fwAppTaskClient.approveSucceedTaskReportPermissionVerificationCom(approveSucceedTaskReportPermissionVerificationComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//步骤1: D3执行审核汇报任务并计算当前及祖先标准数据(公共) - implementExaReportTaskAndCalcCurAndAnceStdDataCom
        ImplementExaReportTaskAndCalcCurAndAnceStdDataComRespDto implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto = null;
        ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto = new ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto();
        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setDataCalcNormalAbnormal("NORMAL_SCENE");//sourceId:2024395_1
        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setStatusBizOptType("EXA_REPORT_TASK_EXA_TO_SUC");//sourceId:1865043_1
        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setCalcAndRefreshDataType("APPROVE_CALC");//sourceId:1862438_1
        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setApproveCalcScene("PLAN_TARGET_AND_FINACE_CALC");//sourceId:1862439_1
        implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setRoleCode("DIRECTOR");//CUSTOM_CONVENTION//sourceId:1865394_1
        if (reqDto != null) {
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setExamineOptType(reqDto.getExamineOptType());//SimpleFieldAssign//sourceId:1862430_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setTaskId(reqDto.getTaskId());//SimpleFieldAssign//sourceId:1862431_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setCycleStageDataId(reqDto.getCycleStageDataId());//SimpleFieldAssign//sourceId:1862432_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1862433_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1862434_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1862435_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1862436_1
            implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1862437_1
        }

        /*D3执行审核汇报任务并计算当前及祖先标准数据(公共)[9734]   */
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getDataCalcNormalAbnormal(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-数据计算正常与异常场景不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getStatusBizOptType(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-任务转成功状态业务操作类型不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getCalcAndRefreshDataType(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-计算与刷新财务数据类型不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getApproveCalcScene(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核的计算场景不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getExamineOptType(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-审核通过或失败操作类型不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getTaskId(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-任务ID不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getCycleStageDataId(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-周期阶段资料记录ID不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getEvaObjTargetCycleId(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-被评对象目标周期ID不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getCycleId(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-归属周期ID不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getTargetCycleContentId(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容ID不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getTargetCycleContentTypeCode(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-关联目标内容类型编码不能为空", false);
        Assert.isNull(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto.getEvaluationTemplateId(), "B3-审核汇报任务-D3执行审核汇报任务并计算当前及祖先标准数据(公共)-冗余评价模板ID不能为空", false);
        implementExaReportTaskAndCalcCurAndAnceStdDataComRespDto = fwAppTargetCalcClient.implementExaReportTaskAndCalcCurAndAnceStdDataCom(implementExaReportTaskAndCalcCurAndAnceStdDataComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffApproveSucceedReportTaskRespDto retData = new BffApproveSucceedReportTaskRespDto();


        return retData;
    }

    /**
     * B3-执行全模板内容计算[6644]
     * gen by moon at 7/14/2023, 4:12:06 AM
     */
    @Trace(operationName = "B3-执行全模板内容计算")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementCalcEvaTempAllContentDatasRespDto implementCalcEvaTempAllContentDatas(BffImplementCalcEvaTempAllContentDatasReqDto reqDto) {


        ImplementExecuteProgressOperationJudgeComRespDto implementExecuteProgressOperationJudgeComRespDto_1 = null;
        ImplementCalcEvaTempAllContentDataComRespDto implementCalcEvaTempAllContentDataComRespDto_1 = null;
//virtualUsage D3执行进度运行判断(公共)  47614
        ImplementExecuteProgressOperationJudgeComRespDto implementExecuteProgressOperationJudgeComRespDto = null;
        ImplementExecuteProgressOperationJudgeComReqDto implementExecuteProgressOperationJudgeComReqDto = new ImplementExecuteProgressOperationJudgeComReqDto();
        implementExecuteProgressOperationJudgeComReqDto.setUseTypeCode("USE_ALL_TEMP_CALCULATE");//CUSTOM_CONVENTION//sourceId:1086349_1_47614
        if (reqDto != null) {
            implementExecuteProgressOperationJudgeComReqDto.setObjectId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1086348_1_47614
            implementExecuteProgressOperationJudgeComReqDto.setThemeContentId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1086350_1_47614
        }

        /*D3执行进度运行判断(公共)[7243]   */
        Assert.isNull(implementExecuteProgressOperationJudgeComReqDto.getObjectId(), "B3-执行全模板内容计算-D3执行进度运行判断(公共)-归属对象内容ID不能为空", false);
        Assert.isNull(implementExecuteProgressOperationJudgeComReqDto.getUseTypeCode(), "B3-执行全模板内容计算-D3执行进度运行判断(公共)-用途类型编码不能为空", false);
        Assert.isNull(implementExecuteProgressOperationJudgeComReqDto.getThemeContentId(), "B3-执行全模板内容计算-D3执行进度运行判断(公共)-主题内容ID不能为空", false);
        implementExecuteProgressOperationJudgeComRespDto = fwAppExecuteProgressClient.implementExecuteProgressOperationJudgeCom(implementExecuteProgressOperationJudgeComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        implementExecuteProgressOperationJudgeComRespDto_1 = implementExecuteProgressOperationJudgeComRespDto;
        if ((implementExecuteProgressOperationJudgeComRespDto != null && implementExecuteProgressOperationJudgeComRespDto.getCustomField() == null)) {
            //if(D3执行进度运行判断(公共).操作过于频繁，请稍后再试文案故事 值等于空 )  47615

            ImplementCalcEvaTempAllContentDataComRespDto implementCalcEvaTempAllContentDataComRespDto = null;
            ImplementCalcEvaTempAllContentDataComReqDto implementCalcEvaTempAllContentDataComReqDto = new ImplementCalcEvaTempAllContentDataComReqDto();
            if (reqDto != null) {
                implementCalcEvaTempAllContentDataComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1005319_1_47616
                implementCalcEvaTempAllContentDataComReqDto.setEvaUnderpinCalcElement(reqDto.getEvaUnderpinCalcElement());//SimpleFieldAssign//sourceId:1068206_1_47616
            }

            /*D3-执行全模板内容计算(公共)[7095]   */
            Assert.isNull(implementCalcEvaTempAllContentDataComReqDto.getEvaluationTemplateId(), "B3-执行全模板内容计算-D3-执行全模板内容计算(公共)-冗余评价模板ID不能为空", false);
            implementCalcEvaTempAllContentDataComRespDto = fwAppGridCalculateClient.implementCalcEvaTempAllContentDataCom(implementCalcEvaTempAllContentDataComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            implementCalcEvaTempAllContentDataComRespDto_1 = implementCalcEvaTempAllContentDataComRespDto;
        }
        BffImplementCalcEvaTempAllContentDatasRespDto retData = new BffImplementCalcEvaTempAllContentDatasRespDto();
        if (implementCalcEvaTempAllContentDataComRespDto_1 != null) {
            retData.setEvaUnderpinCalcElement(implementCalcEvaTempAllContentDataComRespDto_1.getEvaUnderpinCalcElement());//SimpleFieldAssign//sourceId:1068209_1
        }
        if (implementExecuteProgressOperationJudgeComRespDto_1 != null) {
            retData.setCustomField(implementExecuteProgressOperationJudgeComRespDto_1.getCustomField());//SimpleFieldAssign//sourceId:1086352_1
        }


        return retData;
    }

    /**
     * B3-执行全模版标准数据重新计算[7084]
     * gen by moon at 7/14/2023, 4:12:10 AM
     */
    @Trace(operationName = "B3-执行全模版标准数据重新计算")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementRecalcAllStandardDataRespDto implementRecalcAllStandardData(BffImplementRecalcAllStandardDataReqDto reqDto) {


        ImplementExecuteProgressOperationJudgeComRespDto implementExecuteProgressOperationJudgeComRespDto_1 = null;
        ImplementRecalcEvaTempAllStandardDataComRespDto implementRecalcEvaTempAllStandardDataComRespDto_1 = null;
//virtualUsage D3执行进度运行判断(公共)  47611
        ImplementExecuteProgressOperationJudgeComRespDto implementExecuteProgressOperationJudgeComRespDto = null;
        ImplementExecuteProgressOperationJudgeComReqDto implementExecuteProgressOperationJudgeComReqDto = new ImplementExecuteProgressOperationJudgeComReqDto();
        implementExecuteProgressOperationJudgeComReqDto.setUseTypeCode("USE_BRUSH_CALCULATE");//CUSTOM_CONVENTION//sourceId:1086344_1_47611
        if (reqDto != null) {
            implementExecuteProgressOperationJudgeComReqDto.setObjectId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1086343_1_47611
            implementExecuteProgressOperationJudgeComReqDto.setThemeContentId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1086345_1_47611
        }

        /*D3执行进度运行判断(公共)[7243]   */
        Assert.isNull(implementExecuteProgressOperationJudgeComReqDto.getObjectId(), "B3-执行全模版标准数据重新计算-D3执行进度运行判断(公共)-归属对象内容ID不能为空", false);
        Assert.isNull(implementExecuteProgressOperationJudgeComReqDto.getUseTypeCode(), "B3-执行全模版标准数据重新计算-D3执行进度运行判断(公共)-用途类型编码不能为空", false);
        Assert.isNull(implementExecuteProgressOperationJudgeComReqDto.getThemeContentId(), "B3-执行全模版标准数据重新计算-D3执行进度运行判断(公共)-主题内容ID不能为空", false);
        implementExecuteProgressOperationJudgeComRespDto = fwAppExecuteProgressClient.implementExecuteProgressOperationJudgeCom(implementExecuteProgressOperationJudgeComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        implementExecuteProgressOperationJudgeComRespDto_1 = implementExecuteProgressOperationJudgeComRespDto;
        if ((implementExecuteProgressOperationJudgeComRespDto != null && implementExecuteProgressOperationJudgeComRespDto.getCustomField() == null)) {
            //if(D3执行进度运行判断(公共).操作过于频繁，请稍后再试文案故事 值等于空 )  47612

            ImplementRecalcEvaTempAllStandardDataComRespDto implementRecalcEvaTempAllStandardDataComRespDto = null;
            ImplementRecalcEvaTempAllStandardDataComReqDto implementRecalcEvaTempAllStandardDataComReqDto = new ImplementRecalcEvaTempAllStandardDataComReqDto();
            if (reqDto != null) {
                implementRecalcEvaTempAllStandardDataComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1077839_1_47613
                implementRecalcEvaTempAllStandardDataComReqDto.setReviseWeightReCalcElement(reqDto.getReviseWeightReCalcElement());//SimpleFieldAssign//sourceId:1077313_1_47613
            }

            /*D3-执行全模板标准数据重新计算(公共)[7092]   */
            Assert.isNull(implementRecalcEvaTempAllStandardDataComReqDto.getEvaluationTemplateId(), "B3-执行全模版标准数据重新计算-D3-执行全模板标准数据重新计算(公共)-冗余评价模板ID不能为空", false);
//      implementRecalcEvaTempAllStandardDataComRespDto = fwAppGridCalculateClient.implementRecalcEvaTempAllStandardDataCom(implementRecalcEvaTempAllStandardDataComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            implementRecalcEvaTempAllStandardDataComRespDto_1 = implementRecalcEvaTempAllStandardDataComRespDto;
        }
        BffImplementRecalcAllStandardDataRespDto retData = new BffImplementRecalcAllStandardDataRespDto();
        if (implementRecalcEvaTempAllStandardDataComRespDto_1 != null) {
            retData.setReviseWeightReCalcElement(implementRecalcEvaTempAllStandardDataComRespDto_1.getReviseWeightReCalcElement());//SimpleFieldAssign//sourceId:1078301_1
        }
        if (implementExecuteProgressOperationJudgeComRespDto_1 != null) {
            retData.setCustomField(implementExecuteProgressOperationJudgeComRespDto_1.getCustomField());//SimpleFieldAssign//sourceId:1086347_1
        }


        return retData;
    }
    //
}
